.container {
  padding: 32px;
  background-color: #f8fafc;
  min-height: 100vh;
}

/* 页面卡片样式 */
.pageCard {
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 32px;
  max-width: 1400px;
  margin: 0 auto;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e2e8f0;
}

.title {
  font-size: 24px;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.title:before {
  content: "";
  display: block;
  width: 6px;
  height: 24px;
  background-color: #10b981;
  border-radius: 3px;
}

.buttonGroup {
  display: flex;
  gap: 16px;
}

.addButton, .refreshButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.addButton {
  background-color: #10b981;
  color: white;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
  min-width: 160px;
}

.addButton:hover {
  background-color: #059669;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}

.refreshButton {
  background-color: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
  min-width: 120px;
}

.refreshButton:hover {
  background-color: #f1f5f9;
  transform: translateY(-1px);
}

.refreshButton:disabled {
  background-color: #f1f5f9;
  color: #94a3b8;
  border-color: #e2e8f0;
  cursor: not-allowed;
  transform: none;
}

.loadingContainer, .errorContainer {
  background-color: white;
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin: 24px 0;
}

.loadingContainer p {
  color: #64748b;
  font-size: 16px;
  margin: 0;
}

.errorContainer p {
  color: #ef4444;
  font-size: 16px;
  margin: 0 0 20px 0;
}

.retryButton {
  background-color: #ef4444;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.retryButton:hover {
  background-color: #dc2626;
  transform: translateY(-1px);
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 12px;
}

.table th {
  background-color: #f8fafc;
  color: #64748b;
  font-weight: 600;
  font-size: 15px;
  text-align: left;
  padding: 16px 24px;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.table td {
  padding: 20px 24px;
  font-size: 15px;
  color: #334155;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

/* 数字列居中对齐 */
.table td:nth-child(1),
.table td:nth-child(3),
.table td:nth-child(4),
.table td:nth-child(5) {
  text-align: center;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover {
  background-color: #f8fafc;
}

.emptyData {
  color: #94a3b8;
  font-style: italic;
  text-align: center;
  padding: 40px !important;
  font-size: 16px;
}

.statusBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  min-width: 100px;
}

/* 启用状态 */
tr td:nth-child(7) .statusBadge {
  background-color: #dcfce7;
  color: #059669;
  position: relative;
  padding-left: 32px;
}

tr td:nth-child(7) .statusBadge:before {
  content: "●";
  position: absolute;
  left: 16px;
  font-size: 10px;
}

/* 禁用状态 */
tr td:nth-child(7) .statusBadge:not(:has(+ :empty)) {
  background-color: #fee2e2;
  color: #dc2626;
  padding-left: 32px;
}

tr td:nth-child(7) .statusBadge:not(:has(+ :empty)):before {
  content: "●";
  position: absolute;
  left: 16px;
  font-size: 10px;
}

.operation {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
}

.edit, .delete {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 80px;
}

.edit {
  background-color: #3b82f6;
  color: white;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.edit:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
}

.delete {
  background-color: white;
  color: #ef4444;
  border: 1px solid #fecaca;
}

.delete:hover {
  background-color: #fee2e2;
  transform: translateY(-1px);
}

/* 响应式设计 */
@media (max-width: 1440px) {
  .container {
    padding: 24px;
  }

  .pageCard {
    padding: 24px;
  }

  .header {
    margin-bottom: 24px;
  }

  .table th,
  .table td {
    padding: 16px 20px;
  }
}

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .buttonGroup {
    width: 100%;
    justify-content: flex-start;
  }

  .addButton, .refreshButton {
    flex: 1;
  }

  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 16px;
  }

  .pageCard {
    padding: 16px;
  }

  .operation {
    flex-direction: column;
    gap: 8px;
  }

  .edit,
  .delete {
    width: 100%;
    text-align: center;
  }
}

/* 弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modalContent {
    background-color: white;
    border-radius: 8px;
    width: 500px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modalHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.modalTitle {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.closeButton {
    background: none;
    border: none;
    font-size: 20px;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.closeButton:hover {
    color: #1e293b;
}

.modalBody {
    padding: 24px;
}

.formGroup {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.formLabel {
    min-width: 80px;
    text-align: right;
    padding-right: 12px;
    color: #1e293b;
    font-size: 14px;
    font-weight: 500;
    flex-shrink: 0;
}

.formInputWrapper {
    flex: 1;
    position: relative;
}

.required {
    color: #ef4444;
    margin-left: 4px;
}

.formInput {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    color: #1e293b;
    transition: all 0.2s;
}

.formInput:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.formInput::placeholder {
    color: #94a3b8;
}

.formSelect {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    color: #1e293b;
    background-color: white;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M8 10.5l-4-4h8l-4 4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.formSelect:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modalFooter {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.confirmButton {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.confirmButton:hover {
    background-color: #2563eb;
}

.cancelButton {
    background-color: white;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.cancelButton:hover {
    background-color: #f8fafc;
}

.error {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
    position: absolute;
    left: 0;
    bottom: -20px;
} 